List AI Models
Used to retrieve a paginated list of AI models with optional filtering. This allows you to view and search through all configured AI models in your project.
API Endpoint
| Property | Value |
|---|---|
| Request Method | GET |
| Request URL | https://api.seliseblocks.com/models/ |
Request
Request Example
# Get all models with default pagination
curl -X GET 'https://api.seliseblocks.com/models/?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
# Filter by provider
curl -X GET 'https://api.seliseblocks.com/models/?provider=openai&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
# Filter by status and type
curl -X GET 'https://api.seliseblocks.com/models/?status=valid&model_type=chat&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
# Search with pagination
curl -X GET 'https://api.seliseblocks.com/models/?search=GPT&page=1&page_size=10&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
# Combine multiple filters
curl -X GET 'https://api.seliseblocks.com/models/?provider=openai&model_type=chat&is_active=true&page=1&page_size=20&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| provider | string | No | Filter by provider. Available values: openai, azure, anthropic, google, mistral, deepseek, openrouter, grok, perplexity, together, fireworks, groq, custom |
| model_type | string | No | Filter by model type. Available values: chat, embedding, completion |
| project_key | string | No | Filter by project key. |
| is_active | boolean | No | Filter by active status (true/false). |
| status | string | No | Filter by validation status. Available values: valid, invalid |
| search | string | No | Search by display name or description. |
| page | integer | No | Page number for pagination (default: 1, minimum: 1). |
| page_size | integer | No | Number of items per page (default: 20, minimum: 1, maximum: 100). |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
note
Model Providers
- openai: Official OpenAI API models (GPT-4, GPT-3.5, etc.)
- azure: Azure OpenAI Service models
- anthropic: Anthropic Claude models
- google: Google AI models (PaLM, Gemini)
- mistral: Mistral AI models
- deepseek: DeepSeek models
- openrouter: OpenRouter aggregated models
- grok: xAI Grok models
- perplexity: Perplexity AI models
- together: Together AI models
- fireworks: Fireworks AI models
- groq: Groq models
- custom: Custom or self-hosted models
Model Types
- chat: Conversational models for chat interactions
- embedding: Models for generating embeddings
- completion: Text completion models
Status Values
- valid: Model credentials are valid and operational
- invalid: Model credentials failed validation or expired
tip
Filtering and searching best practices:
- Use
providerfilter to narrow results to specific AI providers - Combine
model_typeandproviderfor precise searches - Use
is_active=trueto see only currently enabled models - Filter by
status=validto exclude models with credential issues - Use
searchto find models by name or description - Adjust
page_sizebased on UI requirements (10-50 recommended) - Check
has_nextto implement infinite scrolling
The list helps you:
- View all configured models across projects
- Identify models with credential issues
- Find available models for specific use cases
- Monitor model activation status
- Audit model configurations
- Plan model consolidation or cleanup
Response
Success Response (200 OK)
Returns a paginated list of AI models matching the filter criteria.
{
"models": [
{
"_id": "model_123",
"CreatedDate": "2025-12-01T10:30:00Z",
"LastUpdatedDate": "2026-01-10T14:20:00Z",
"CreatedBy": "user_456",
"Language": "en",
"LastUpdatedBy": "user_789",
"OrganizationIds": ["org_001"],
"Tags": ["production", "gpt-4"],
"Provider": "openai",
"ModelType": "chat",
"ServicePlatform": "official_api",
"ProjectKey": "YOUR_PROJECT_KEY",
"Description": "GPT-4 Turbo model for production use",
"Capabilities": {
"max_tokens": 8192,
"supports_functions": true,
"supports_vision": false
},
"DisplayName": "GPT-4 Turbo Production",
"ModelName": "gpt-4-turbo-preview",
"ApiKey": "***masked***",
"BaseUrl": "https://api.openai.com/v1",
"OpenAiOrganizationId": "org-123456",
"OpenAiProjectId": null,
"ApiVersion": null,
"DeploymentName": null,
"CustomParameters": {},
"CustomHeaders": {},
"Status": "valid",
"IsActive": true,
"HasStreaming": true
},
{
"_id": "model_456",
"CreatedDate": "2025-11-15T08:00:00Z",
"LastUpdatedDate": "2026-01-05T16:45:00Z",
"CreatedBy": "user_456",
"Language": "en",
"LastUpdatedBy": "user_456",
"OrganizationIds": ["org_001"],
"Tags": ["development", "claude"],
"Provider": "anthropic",
"ModelType": "chat",
"ServicePlatform": "official_api",
"ProjectKey": "YOUR_PROJECT_KEY",
"Description": "Claude 3 Opus for development testing",
"Capabilities": {
"max_tokens": 4096,
"supports_functions": false,
"supports_vision": true
},
"DisplayName": "Claude 3 Opus Dev",
"ModelName": "claude-3-opus-20240229",
"ApiKey": "***masked***",
"BaseUrl": "https://api.anthropic.com",
"OpenAiOrganizationId": null,
"OpenAiProjectId": null,
"ApiVersion": null,
"DeploymentName": null,
"CustomParameters": {},
"CustomHeaders": {},
"Status": "valid",
"IsActive": true,
"HasStreaming": true
}
],
"project_key": "YOUR_PROJECT_KEY",
"total": 127,
"page": 1,
"page_size": 20,
"has_next": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
| models | array | Array of model objects matching the filter criteria. |
| project_key | string | The project key used for filtering. |
| total | integer | Total number of models matching the filters. |
| page | integer | Current page number. |
| page_size | integer | Number of items per page. |
| has_next | boolean | Whether there are more pages available. |
Model Object Fields
| Field | Type | Description |
|---|---|---|
| _id | string | Unique identifier of the model. |
| CreatedDate | string | ISO 8601 timestamp when the model was created. |
| LastUpdatedDate | string | ISO 8601 timestamp when the model was last updated. |
| CreatedBy | string | User ID who created the model. |
| Language | string | Language code for the model. |
| LastUpdatedBy | string | User ID who last updated the model. |
| OrganizationIds | array | Array of organization IDs. |
| Tags | array | Array of tags for categorization. |
| Provider | string | AI provider name. |
| ModelType | string | Type of model (chat, embedding, completion). |
| ServicePlatform | string | Service platform type. |
| ProjectKey | string | Project key the model belongs to. |
| Description | string | Description of the model. |
| Capabilities | object | Model capabilities and features. |
| DisplayName | string | Human-readable display name. |
| ModelName | string | Technical model name. |
| ApiKey | string | API key (masked in responses). |
| BaseUrl | string | Base URL for API requests. |
| OpenAiOrganizationId | string | OpenAI organization ID (if applicable). |
| OpenAiProjectId | string | OpenAI project ID (if applicable). |
| ApiVersion | string | API version (for Azure OpenAI). |
| DeploymentName | string | Deployment name (for Azure OpenAI). |
| CustomParameters | object | Custom parameters for the model. |
| CustomHeaders | object | Custom HTTP headers. |
| Status | string | Validation status (valid, invalid). |
| IsActive | boolean | Whether the model is active. |
| HasStreaming | boolean | Whether the model supports streaming. |
Empty Results Response
Returns when no models match the filter criteria.
{
"models": [],
"project_key": "YOUR_PROJECT_KEY",
"total": 0,
"page": 1,
"page_size": 20,
"has_next": false
}
Error Response (422 Unprocessable Entity)
Returns validation error details when the request parameters are invalid.
{
"detail": [
{
"loc": [
"query",
"page_size"
],
"msg": "ensure this value is less than or equal to 100",
"type": "value_error.number.not_le"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., query parameter). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 400 | Bad Request - Invalid query parameters | Bad Request |
| 422 | Validation Error - Invalid parameter values | Unprocessable Entity |